package com.xiaozhi.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;

import java.time.LocalDateTime;

/**
 * 健康分析请求DTO
 */
@Schema(description = "健康分析请求参数")
public class AnalysisRequestDto {
    
    @Schema(description = "用户ID", required = true)
    private Long userId;
    
    @Schema(description = "分析类型", required = true)
    private String analysisType;
    
    @Schema(description = "开始日期", required = true)
    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
    private LocalDateTime startDate;
    
    @Schema(description = "结束日期", required = true)
    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
    private LocalDateTime endDate;
    
    // 默认构造函数
    public AnalysisRequestDto() {}
    
    // 全参构造函数
    public AnalysisRequestDto(Long userId, String analysisType, LocalDateTime startDate, LocalDateTime endDate) {
        this.userId = userId;
        this.analysisType = analysisType;
        this.startDate = startDate;
        this.endDate = endDate;
    }
    
    // Getter和Setter方法
    public Long getUserId() {
        return userId;
    }
    
    public void setUserId(Long userId) {
        this.userId = userId;
    }
    
    public String getAnalysisType() {
        return analysisType;
    }
    
    public void setAnalysisType(String analysisType) {
        this.analysisType = analysisType;
    }
    
    public LocalDateTime getStartDate() {
        return startDate;
    }
    
    public void setStartDate(LocalDateTime startDate) {
        this.startDate = startDate;
    }
    
    public LocalDateTime getEndDate() {
        return endDate;
    }
    
    public void setEndDate(LocalDateTime endDate) {
        this.endDate = endDate;
    }
    
    @Override
    public String toString() {
        return "AnalysisRequestDto{" +
                "userId=" + userId +
                ", analysisType='" + analysisType + '\'' +
                ", startDate=" + startDate +
                ", endDate=" + endDate +
                '}';
    }
}